{{ $attrEq := "$=" }}
{{ $attrVal := .RelPermalink }}
{{ if eq .RelPermalink "/" }}
  {{ $attrEq = "=" }}
  {{ $attrVal = "./" }}
{{ end }}
{{ if .Site.Params.BookEnableJS }}
  {{- template "jsmenu" . -}}
{{ end }}

<style>
  nav ul a[href{{ $attrEq }}"{{ $attrVal }}"] {
  color: {{ default "#004ed0" .Site.Params.BookMenuBundleActiveLinkColor }};
  }
</style>

{{ with .Site.GetPage .Site.Params.BookMenuBundle }}
  {{- .Content -}}
{{ end }}